import math


class coordinate:

    def __init__(self, x, y):
        self.x = x
        self.y = y


    def __eq__(self, coord):
        return equals(self, coord)

def add(coord1, coord2):
    x = coord1.x + coord2.x
    y = coord1.y + coord2.y
    return coordinate(x, y)


def manhattan_dist(start, end):
    x = math.fabs(start.x - end.x)
    y = math.fabs(start.y - end.y)
    return x + y


def pythagorean_dist(start, end):
    x = (start.x - end.x) ** 2
    y = (start.y - end.y) ** 2
    return math.sqrt(x + y)

def equals(coord1, coord2):
    return coord1.x == coord2.x and coord1.y == coord2.y
